/**
 * Created by huzhihui on 2017/8/24.
 */
import React from "react";
import {IndexRoute, Route, Router} from "dva/router";
import Index from "./routes/Index";
import Api from "./routes/Api";
import Introduction from "./routes/Api/Introduction";
import Configuration from "./routes/Api/Configuration";
import QuickStart from "./routes/Api/QuickStart";
import AboutUs from "./routes/Api/AboutUs";
import Login from "./routes/Login";


function RouterConfig({history}) {
    return (
        <Router history={history}>
            <Route path="/index.html" component={Index}/>
            <Route path="/" component={Index}/>
            <Route path="/api" component={Api}>
                <IndexRoute component={Introduction}/>
                <Route path="introduction" component={Introduction}/>
                <Route path="configuration" component={Configuration}/>
                <Route path="quickStart" component={QuickStart}/>
                <Route path="aboutUs" component={AboutUs}/>
            </Route>
            <Route path="/login" component={Login}/>
        </Router>
    );
}

export default RouterConfig;